package com.haoze.nurse.dao;


import com.haoze.nurse.model.NurseFileIndexEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface NurseFileIndexMapper {

    NurseFileIndexEntity queryIndexByRecordType(@Param("recordType") String recordType,
                                                @Param("inpatNum") String inpatNum);

    void insert(NurseFileIndexEntity fileIndexEntity);

    /**
     * 根据住院号获取emrFileId
     * @param inpatNum
     * @return
     */
    String queryFileIndexIdByInpatNum(
            @Param("inpatNum") String inpatNum,
            @Param("recordType") String recordType);

    /**
     * 绑定诊断到文书
     * @param diagId
     * @param inpatNum
     * @return
     */
    int bondNurseFileIndexByDiagId(@Param("diagId") String diagId,
                                   @Param("inpatNum") String inpatNum);


    List<String> getUnits(@Param("elementId") String elementId);

    String queryInpatNumByFileIndexId(@Param("fileIndexId") String fileIndexId);

    List<Map<String,Object>> getGPFromFileIndex(@Param("inpatNum") String inpatNum);

    int updateModifyLocation(NurseFileIndexEntity fileIndexEntity);

    List<Map<String,String>> getFromListByUser(@Param("userId") String userId);

    String getSecondProductionCount(@Param("inpatNum") String inpatNum);

    String getSecondPregnancyCount(@Param("inpatNum") String inpatNum);

    Map<String, String> getDesensitization(@Param("inpatNum")String inpatNum);
}
